package STUDENT.TRINHQUANGXUANDUC.OPPS.dynamicarray.qlthuvien.Views;

import java.awt.EventQueue;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.border.EmptyBorder;

public class view extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	private JPasswordField passwordField;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					view frame = new view();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public view() {
		setTitle("Longin");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 357, 177);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);

		JLabel lblUsername = new JLabel("Username");

		JLabel lblPassword = new JLabel("Password");

		textField = new JTextField();
		textField.setColumns(10);

		passwordField = new JPasswordField();

		JButton btnLogin = new JButton("Login");
		btnLogin.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
			}
		});

		JButton btnExit = new JButton("Exit");
		GroupLayout gl_contentPane = new GroupLayout(contentPane);
		gl_contentPane
				.setHorizontalGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
						.addGroup(gl_contentPane.createSequentialGroup().addGap(111)
								.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
										.addGroup(gl_contentPane.createSequentialGroup().addComponent(btnLogin)
												.addPreferredGap(ComponentPlacement.RELATED).addComponent(btnExit))
										.addGroup(gl_contentPane.createSequentialGroup().addComponent(lblUsername)
												.addPreferredGap(ComponentPlacement.RELATED).addComponent(textField))
										.addGroup(gl_contentPane.createSequentialGroup().addComponent(lblPassword)
												.addPreferredGap(ComponentPlacement.RELATED).addComponent(passwordField,
														GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
												.addGap(2)))
								.addGap(82)));
		gl_contentPane.setVerticalGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPane.createSequentialGroup().addGap(20)
						.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE).addComponent(lblUsername)
								.addComponent(textField))
						.addPreferredGap(ComponentPlacement.UNRELATED)
						.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE).addComponent(lblPassword)
								.addComponent(passwordField, GroupLayout.PREFERRED_SIZE, 19, Short.MAX_VALUE))
						.addPreferredGap(ComponentPlacement.UNRELATED).addGroup(gl_contentPane
								.createParallelGroup(Alignment.BASELINE).addComponent(btnLogin).addComponent(btnExit))
						.addGap(24)));
		contentPane.setLayout(gl_contentPane);
	}
}
